﻿// Write an expression that checks for given integer if its third digit (right-to-left) is 7. E. g. 1732 -> true.

using System;

class CheckIfThirdDigitiIs7
{
    static void Main()
    {
        Console.Write("Enter you number: ");
        int number = int.Parse(Console.ReadLine());
        int numberDividedBy100 = number / 100;
        bool thirdDidgit7;
        thirdDidgit7 = (numberDividedBy100 % 10 == 7) ? true : false;
        Console.WriteLine("The third digit from right to left of your number is 7: {0}", thirdDidgit7);
    }
}
